<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>圣杯布局</title>
<style>
/* 布局1-圣杯布局 */
.container {
    position: relative;;
    height: 300px;
    background: #ddd;
    padding: 0 300px 0;
}
.container .middle{
    float: left;
    width: 100%;
    height: 300px;
    background-color: red;
}
.container .left{
    float: left;
    position: relative;
    height: 300px;
    width: 300px;
    margin-left: -100%;
    left: -300px;
    background-color: yellow;
}
.container .right {
    float: left;
    position: relative;
    width: 300px;
    height: 300px;
    margin-left: -300px;
    left: 300px;
    background-color: green;
}
</style>
</head>
<body>
<!-- 布局1-圣杯布局 -->
<div class="container">
    <div class="middle"></div>
    <div class="left"></div>
    <div class="right"></div>
</div>
</body>
</html>